package com.zhuangjie.shop.controller;


import com.zhaungjie.base.conduit.R;
import com.zhuangjie.shop.entity.Menu;
import com.zhuangjie.shop.service.MenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 菜单表 前端控制器
 * </p>
 *
 * @author zhuangjie
 * @since 2023-10-06
 */
@RestController
@RequestMapping("/menu")
@Api(tags = "前端动态路由相关API")
public class MenuController {
    @Autowired
    private MenuService menuService;

    @ApiOperation("获取登录者拥有的Menu")
    @GetMapping("/queryList")
    public R queryList() {
        List<Menu> menuList =  menuService.queryList();
        return R.ok().data(menuList);
    }

}

